home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / text / hyper / ADtoHT2_1.lha / Source.lha / MyLib.lha / string / strpbrk.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-05  |  377 b   |  27 lines

  1. #include <string.h>
  2.  
  3. /************************************************************************/
  4.  
  5. #undef strpbrk
  6.  
  7. char *strpbrk(const char *s1, const char *s2)
  8.  
  9. {
  10.   const unsigned char *c1=s1;
  11.   const unsigned char *c2;
  12.  
  13.   while(*c1!='\0')
  14.     {
  15.       c2=s2;
  16.       while(*c2!='\0')
  17.     {
  18.       if(*c1==*c2++)
  19.         {
  20.           return (char *)c1;
  21.         }
  22.       c1++;
  23.     }
  24.     }
  25.   return NULL;
  26. }
  27.